<form method="post" name="searchform" action="/hotelres/search/">
<label>Search by Country</label>
<select name="hotel_country" id="hotel_country" onchange="getcities(this.value)" >
<option value="0">Select Country</option>
<option value="1">Sri Lanka</option>
<option value="2">Maldives</option>
</select>

<label>Search by City</label>
<select name="hotel_city" id="hotel_city">
<option value="0">Select City</option>

</select>

<label>Search by Hotel Name</label>
<select name="hotel_title" id="hotel_title">
<option value="0">Select Hotel</option>

</select>
<input type="submit"  value="Search">
</form>

<script type="text/javascript">
function getcities(country)
		{

	 
				$.ajax
				({
				type: "POST",
				data: "country=" + country,
				url: "/hotelres/getcity/",
				success: function(html){
					//alert(html);
				$("#hotel_city").html(html);       
				}
				});

				$.ajax
				({
				type: "POST",
				data: "country=" + country,
				url: "/hotelres/gethotelbycountry/",
				success: function(html1){
					//alert(html);
				$("#hotel_title").html(html1);       
				}
				});
				
			  
		
		}

 function gethotelbycountry(country)
 {
     alert("TGG");

		$.ajax
		({
		type: "POST",
		data: "country=" + country,
		url: "/hotelres/gethotelbycountry/",
		success: function(html){
			//alert(html);
		$("#hotel_title").html(html);       
		}
		});
	   

}

</script>
